package com.insurance.modules.claim.controller;

import com.insurance.common.common.ResponseData;
import com.insurance.modules.claim.entity.InsuredInfoEntity;
import com.insurance.modules.claim.service.InsuredInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * 出险人信息表
 *
 * @author weiruifeng
 * @email
 * @date 2021-09-24 17:42:47
 */
@RestController
@RequestMapping("claim/insuredinfo")
@Api(tags = "出险人信息")
public class InsuredInfoController {
    @Autowired
    private InsuredInfoService insuredInfoService;

    /**
     * 根据id查询出险人信息
     */
    @PostMapping("/info")
    @RequiresPermissions("claim:insuredinfo:info")
    @ApiOperation(value = "根据id查询出险人信息", notes = "根据id查询出险人信息")
    public ResponseData<InsuredInfoEntity> info(@RequestParam(value = "id") String id) {
        return ResponseData.success(insuredInfoService.getById(id));
    }

}
